import {JIA,JIAN} from "../actions/counter";
import counterResult from "../reducers/counter";

export default (ctx)=>{
  const {jia,jian} = counterResult(ctx.$data);

  return function(type,...arg){
    switch(type){
      case JIA:
        ctx.result = jia();
        break;
      case JIAN:
        ctx.result = jian();
        break;
      default:
        break;
    }
  }
}
